package com.irishud.aidl;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2016/9/28.
 */

public class MyLatlng implements Parcelable {
    private float lat;
    private float lng;

    public MyLatlng(float lat, float lng){
        this.lat = lat;
        this.lng = lng;
    }
    public float getLatitude(){
        return lat;
    }
    public float getLongitude(){
        return lng;
    }
    protected MyLatlng(Parcel in) {
        lat = in.readFloat();
        lng = in.readFloat();
    }

    public static final Creator<MyLatlng> CREATOR = new Creator<MyLatlng>() {
        @Override
        public MyLatlng createFromParcel(Parcel in) {
            return new MyLatlng(in);
        }

        @Override
        public MyLatlng[] newArray(int size) {
            return new MyLatlng[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeFloat(lat);
        dest.writeFloat(lng);
    }
}
